package io.github.springstudent.client;

import io.github.springstudent.api.HelloService;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

/**
 * @author zhouning
 * @date 2022/07/29 9:34
 */
public class RmiProvider {

    public static void main(String[] args) throws Exception {
        HelloService helloService = new HelloServiceImpl();
        LocateRegistry.createRegistry(1111);
        Naming.bind("rmi://localhost:1111/rmi",helloService);
        System.out.println("start rmi provider");
    }
}
